package service.impl;

import dao.impl.ProductDaoImpl;
import domain.Product;
import service.ProductService;

import java.util.List;

/**
 * @Author admin
 * @Date 2019/2/25 11:11
 */
public class ProdutcServiceImpl implements ProductService {
    ProductDaoImpl dao = new ProductDaoImpl();
    @Override
    public List<Product> findAll() {
        return dao.findAll();
    }

    @Override
    public int deleteProduct(int pid) {
        return dao.deleteProduct(pid);
    }

    @Override
    public void editProduct(Product p) {
         dao.editProduct(p);
    }

    @Override
    public List<Product> productAll(String pid) {
        return dao.productAll(pid);
    }

    @Override
    public int addProducct(Product product) {
        return dao.addProducct(product);
    }

}
